<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      height: 100px;
      background-color: rgba(17, 119, 255, 0.5);
    }

    span {
      padding: 100px 0;
      margin: 100px 0;
    }

    .inline-block {
      display: inline-block;
    }
  </style>
</head>

<body>
  <div></div>
  <!-- 行内元素垂直方向上的 padding 和 margin 不生效 -->
  <span>Hello world!</span>
  <div></div>
  <!-- 把行内元素转换成行内块元素 -->
  <span class="inline-block">Hello world!</span>
  <div></div>
</body>

</html>